﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GMS
{
    public partial class Pages_Admin_Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text))
            {
                if (BLL.Common.AuthenticateUser(txtUserName.Text, Utility.DESEncrypt(txtPassword.Text)))
                {
                    SessionVariable.Instance.UserDetails.IsAdmin = true;
                    Response.Redirect("Edge.aspx");
                }                
            }
        }
    }
}